package com.xlh.dto.courseTest.paper;

import com.xlh.param.courseTest.PreviewQuestionParam;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.util.List;


@Data
@ApiModel("试卷详情信息")
public class PaperDetailDTO {

    // 模板id
    private Long modelId;
    // 选定题目id列表
    @Valid
    private List<PreviewQuestionParam> questionList;

    @NotBlank(message = "试卷名称不能为空")
    @Length(max = 20, message = "试卷名称最多填写20个字")
    private String paperName;

    @NotNull(message = "考试时间不能为空")
    @Max(value = 120, message = "考试时间最大为120分钟")
    private Integer timeLength;

}
